import 'package:backend.core/core/domain/entities/api/google_play/api_google_play_purchased_subscription_cancellation_survey_reason.dart';
import 'package:backend.core/core/domain/entities/google_play/google_play_purchased_subscription_info_cancellation_survey_reason.dart';

abstract class CreateApiGooglePlayPurchasedSubscriptionCancellationSurveyReasonFromInternalOne {
  ApiGooglePlayPurchasedSubscriptionCancellationSurveyReason call({
    required GooglePlayPurchasedSubscriptionInfoCancellationSurveyReason reason,
  });
}

class CreateApiGooglePlayPurchasedSubscriptionCancellationSurveyReasonFromInternalOneImpl
    implements CreateApiGooglePlayPurchasedSubscriptionCancellationSurveyReasonFromInternalOne {
  const CreateApiGooglePlayPurchasedSubscriptionCancellationSurveyReasonFromInternalOneImpl();

  @override
  ApiGooglePlayPurchasedSubscriptionCancellationSurveyReason call({
    required GooglePlayPurchasedSubscriptionInfoCancellationSurveyReason reason,
  }) {
    switch (reason) {
      case GooglePlayPurchasedSubscriptionInfoCancellationSurveyReason.unspecified:
        return ApiGooglePlayPurchasedSubscriptionCancellationSurveyReason.unspecified;
      case GooglePlayPurchasedSubscriptionInfoCancellationSurveyReason.other:
        return ApiGooglePlayPurchasedSubscriptionCancellationSurveyReason.other;
      case GooglePlayPurchasedSubscriptionInfoCancellationSurveyReason.insufficientUse:
        return ApiGooglePlayPurchasedSubscriptionCancellationSurveyReason.insufficientUse;
      case GooglePlayPurchasedSubscriptionInfoCancellationSurveyReason.technicalIssues:
        return ApiGooglePlayPurchasedSubscriptionCancellationSurveyReason.technicalIssues;
      case GooglePlayPurchasedSubscriptionInfoCancellationSurveyReason.cost:
        return ApiGooglePlayPurchasedSubscriptionCancellationSurveyReason.cost;
      case GooglePlayPurchasedSubscriptionInfoCancellationSurveyReason.notBestApp:
        return ApiGooglePlayPurchasedSubscriptionCancellationSurveyReason.notBestApp;
    }
  }
}
